package com.ruoyi.houseTask.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.houseTask.mapper.THouseNucleicTaskMapper;
import com.ruoyi.houseTask.domain.THouseNucleicTask;
import com.ruoyi.houseTask.service.ITHouseNucleicTaskService;

/**
 * 住户核酸任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-16
 */
@Service
public class THouseNucleicTaskServiceImpl implements ITHouseNucleicTaskService 
{
    @Autowired
    private THouseNucleicTaskMapper tHouseNucleicTaskMapper;

    /**
     * 查询住户核酸任务
     * 
     * @param id 住户核酸任务主键
     * @return 住户核酸任务
     */
    @Override
    public THouseNucleicTask selectTHouseNucleicTaskById(Long id)
    {
        return tHouseNucleicTaskMapper.selectTHouseNucleicTaskById(id);
    }

    /**
     * 查询住户核酸任务列表
     * 
     * @param tHouseNucleicTask 住户核酸任务
     * @return 住户核酸任务
     */
    @Override
    public List<THouseNucleicTask> selectTHouseNucleicTaskList(THouseNucleicTask tHouseNucleicTask)
    {
        return tHouseNucleicTaskMapper.selectTHouseNucleicTaskList(tHouseNucleicTask);
    }

    /**
     * 新增住户核酸任务
     * 
     * @param tHouseNucleicTask 住户核酸任务
     * @return 结果
     */
    @Override
    public int insertTHouseNucleicTask(THouseNucleicTask tHouseNucleicTask)
    {
        tHouseNucleicTask.setCreateTime(DateUtils.getNowDate());
        return tHouseNucleicTaskMapper.insertTHouseNucleicTask(tHouseNucleicTask);
    }

    /**
     * 修改住户核酸任务
     * 
     * @param tHouseNucleicTask 住户核酸任务
     * @return 结果
     */
    @Override
    public int updateTHouseNucleicTask(THouseNucleicTask tHouseNucleicTask)
    {
        return tHouseNucleicTaskMapper.updateTHouseNucleicTask(tHouseNucleicTask);
    }

    /**
     * 批量删除住户核酸任务
     * 
     * @param ids 需要删除的住户核酸任务主键
     * @return 结果
     */
    @Override
    public int deleteTHouseNucleicTaskByIds(Long[] ids)
    {
        return tHouseNucleicTaskMapper.deleteTHouseNucleicTaskByIds(ids);
    }

    /**
     * 删除住户核酸任务信息
     * 
     * @param id 住户核酸任务主键
     * @return 结果
     */
    @Override
    public int deleteTHouseNucleicTaskById(Long id)
    {
        return tHouseNucleicTaskMapper.deleteTHouseNucleicTaskById(id);
    }
}
